package com.flying.invest.job;

import com.flying.common.util.Codes;
import com.flying.framework.annotation.Service;
import com.flying.framework.model.ActionResult;
import com.flying.framework.model.ModelFactory;
import com.flying.framework.service.AbstractService;
import com.flying.invest.assets.service.AssetsPriceSpiderService;
import com.flying.invest.base.service.CurrencyService;

@Service(value="SpiderJob", desc="")
public class SpiderJob extends AbstractService {
	private CurrencyService cs;
	private AssetsPriceSpiderService ss;
	
	public void setCurrencyService(CurrencyService s) {
		this.cs = s;
	}
	public void setAssetsPriceSpiderService(AssetsPriceSpiderService s) {
		this.ss = s;
	}
	
	public ActionResult run() {
		this.cs.fetchAllCurrencyRate();
		this.ss.fetchAll();
		return ModelFactory.create(ActionResult.class, Codes.CODE, Codes.SUCCESS);
	}
}
